package com.kingint.mbg.bas.entity;

import com.baomidou.mybatisplus.annotation.IdType;

import java.util.ArrayList;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import com.kingint.mbg.group.Insert;
import com.kingint.mbg.group.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;

/**
 * <p>
 * 遗留物品相关设置表
 * </p>
 *
 * @author wxh
 * @since 2020-12-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BasItemsLeft对象", description="遗留物品相关设置表")
public class BasItemsLeft implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "父类id")
    @TableField("pid")
    private Integer pid;

    @ApiModelProperty(value = "对应名称")
    @TableField("name")
    @NotEmpty(groups = {Insert.class, Update.class},message = "遗留物品名称不能为空")
    private String name;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "对应的酒店id")
    @TableField("hotel_id")
    private Integer hotelId;

    @ApiModelProperty(value = "排序")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty(value = "状态（0，正常，1删除）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "判断是否是物品还是分类：0是遗留物品，1是分类")
    @TableField("is_sort")
    private Integer isSort;
    @TableField(exist = false)
    private List<BasItemsLeft> children=new ArrayList<>();

    @TableField(exist = false)
    private List<BasItemsLeft> itemsLeftList;

}
